﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FreeSql.DataAnnotations;


// 定义 placement_item 类
public class placement_item
{
    public string[] location_tag_list { get; set; }
    public string[] approve1 { get; set; }
    public string[] approve2 { get; set; }
}

[Index("uk_location", "location_tag", true)]
[Table(Name = "wallet_rs_location")]
 record wallet_rs_location
    {
        [Column(Name = "id", IsPrimary = true)]
        public int Id { get; set; }

        [Column(Name = "location_tag", StringLength = 64)]
        public string? LocationTag { get; set; }

        [Column(Name = "placement_tag", StringLength = 64)]
        public string? PlacementTag { get; set; }

        [Column(Name = "status", StringLength = 32)]
        public string? status { get; set; }

 


}




[Table(Name = "wallet_data_permission")]
record DataPermission
{
    [Column(Name = "id", IsPrimary = true)]
    public int Id { get; set; }


    [Column(Name = "data_module", StringLength = 64)]
    public string? DataModule { get; set; }

    [Column(Name = "data_key", StringLength = 255)]
    public string? DataKey { get; set; }


    /// <summary>
    /// task_approve1 task_approve2
    /// </summary>
    [Column(Name = "op_type", StringLength = 64)]
    public string? op_type { get; set; }

    /// <summary>
    // role
    /// </summary>
    [Column(Name = "auth_type", StringLength = 16)]
    public string? auth_type { get; set; } = "role";

    [Column(Name = "auth_object_key", StringLength = 255)]
    public string? auth_object_key { get; set; }
    [Column(Name = "status")]
    public int status { get; set; }

    [Column(Name = "creator", StringLength = 128)]
    public string? Creator { get; set; }

    [Column(Name = "operator", StringLength = 128)]
    public string? Operator {get; set; }

    [Display(Name = "创建时间")]
    [Column(Name = "gmt_created",  ServerTime = DateTimeKind.Utc, CanUpdate = false)]
    public DateTime Created { get; set; }

    [Column(Name = "gmt_modified", ServerTime = DateTimeKind.Utc)]
    public DateTime Modified { get; set; }
}
